import RPi.GPIO as GPIO

GPIO.setup(12, GPIO.IN)

while True:
    input = GPIO.input(12)

    if input == False:
        print ("Button pressed")
        while input==False:
            input = GPIO.input(12)

